package jh.com.jhappbf.model;

import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;

public class ContractSettingModel implements Parcelable {

    private String startTime;
    private String endTime;
    private String sepc;
    private String cargoname;
    private String sender;
    private String receiver;
    private String states;

    public ContractSettingModel() {
    }

    private ContractSettingModel(Parcel parcel) {
        startTime = parcel.readString();
        endTime = parcel.readString();
        sepc = parcel.readString();
        cargoname = parcel.readString();
        sender = parcel.readString();
        receiver = parcel.readString();
        states = parcel.readString();
    }

    //获取公司
    public String getSpec() {
        if (TextUtils.isEmpty(sepc)) {
            return "";
        } else {
            return sepc;
        }
    }

    public void setSpec(String spec) {
        this.sepc = spec;
    }

    //汇总的开始时间
    public String getStartTime() {
        if (TextUtils.isEmpty(startTime)) {
            return "";
        } else {
            return startTime;
        }
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    //汇总结束时间
    public String getEndTime() {
        if (TextUtils.isEmpty(endTime)) {
            return "";
        } else {
            return endTime;
        }
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    //货名
    public String getCargoname() {
        if (TextUtils.isEmpty(cargoname)) {
            return "";
        } else {
            return cargoname;
        }
    }

    public void setCargoname(String cargoname) {
        this.cargoname = cargoname;
    }

    //发货
    public String getSender() {
        if (TextUtils.isEmpty(sender)) {
            return "";
        } else {
            return sender;
        }
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    //收货
    public String getReceiver() {
        if (TextUtils.isEmpty(receiver)) {
            return "";
        } else {
            return receiver;
        }
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }


    public String getStates() {
        return states;
    }

    public void setStates(String states) {
        this.states = states;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(startTime);
        dest.writeString(endTime);
        dest.writeString(sepc);
        dest.writeString(cargoname);
        dest.writeString(sender);
        dest.writeString(receiver);
        dest.writeString(states);
    }

    public static final Creator<ContractSettingModel> CREATOR = new Creator<ContractSettingModel>() {
        @Override
        public ContractSettingModel createFromParcel(Parcel source) {
            return new ContractSettingModel(source);
        }

        @Override
        public ContractSettingModel[] newArray(int size) {
            return new ContractSettingModel[size];
        }
    };

}